﻿using System.ComponentModel;
using XMLCharSheets.Annotations;

namespace XMLCharSheets
{
    public class PathfinderCustomControlViewModel : INotifyPropertyChanged
    {
        private bool _terrainObjectIsLightSource;
        public event PropertyChangedEventHandler PropertyChanged;

        [NotifyPropertyChangedInvocator]
        protected virtual void OnPropertyChanged(string propertyName)
        {
            PropertyChangedEventHandler handler = PropertyChanged;
            if (handler != null) handler(this, new PropertyChangedEventArgs(propertyName));
        }

        public bool TerrainObjectIsLightSource
        {
            get { return _terrainObjectIsLightSource; }
            set
            {
                if (value.Equals(_terrainObjectIsLightSource)) return;
                _terrainObjectIsLightSource = value;
                OnPropertyChanged("TerrainObjectIsLightSource");
            }
        }
    }
}